home *** CD-ROM | disk | FTP | other *** search
/ Easy Baby Massage / Easy Baby Massage.iso / pc / content / main.dcr / Internal_103_preLoad1.ls < prev    next >
Encoding:
Text File  |  2007-04-22  |  1.4 KB  |  49 lines

  1. property n1, n2, n3, n4, n5, n6, loading
  2.  
  3. on beginSprite me
  4.   loading = [0, 0, 0, 0, 0, 0]
  5.   n1 = preloadNetThing(the moviePath & "chapter.txt")
  6.   n2 = preloadNetThing(the moviePath & "quiz.txt")
  7.   n3 = preloadNetThing(the moviePath & "config.txt")
  8.   n4 = preloadNetThing(the moviePath & "main.png")
  9.   n5 = preloadNetThing(the moviePath & "quiz.png")
  10.   n6 = preloadNetThing(the moviePath & "video.png")
  11. end
  12.  
  13. on exitFrame me
  14.   if netDone(n1) then
  15.     loading[1] = 1
  16.   end if
  17.   if netDone(n2) then
  18.     loading[2] = 1
  19.   end if
  20.   if netDone(n3) then
  21.     loading[3] = 1
  22.   end if
  23.   if netDone(n4) then
  24.     loading[4] = 1
  25.   end if
  26.   if netDone(n5) then
  27.     loading[5] = 1
  28.   end if
  29.   if netDone(n6) then
  30.     loading[6] = 1
  31.   end if
  32.   tmp = 0
  33.   repeat with i = 1 to 6
  34.     tmp = tmp + loading[i]
  35.   end repeat
  36.   sprite(14).width = tmp * 124 / 6
  37.   if netDone(n1) and netDone(n2) and netDone(n3) and netDone(n4) and netDone(n5) and netDone(n6) then
  38.     importFileInto(member(1, "external files"), the moviePath & "chapter.txt")
  39.     importFileInto(member(2, "external files"), the moviePath & "quiz.txt")
  40.     importFileInto(member(3, "external files"), the moviePath & "config.txt")
  41.     importFileInto(member(7, "internal"), the moviePath & "main.png")
  42.     importFileInto(member(8, "internal"), the moviePath & "video.png")
  43.     importFileInto(member(9, "internal"), the moviePath & "quiz.png")
  44.     go(the frame + 1)
  45.   else
  46.     go(the frame)
  47.   end if
  48. end
  49.